home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
cuj1008.zip
/
1008084A
< prev
next >
Wrap
Text File
|
1991-12-04
|
846b
|
48 lines
// anyclass.hpp
// declaration of anyClass, a test
// class, and declaration of
// RefCntPtr to anyClass
#ifndef CLASS_anyClass
#define CLASS_anyClass
#include "refptr.hpp"
#include "refitem.hpp"
#include <iostream.h>
class anyClass : public RefCntItem
{
public:
int intVal;
char *string;
anyClass (void)
: RefCntItem()
, intVal(0)
, string(0)
{
cout << "anyClass constructor\n\n";
};
~anyClass (void)
{
cout << "anyClass destructor\n";
show();
};
void show(void)
{
cout << "anyClass contents:\n"
<< intVal << " "
<< string << "\n"
<< "reference count: "
<< refCnt() << "\n\n";
};
};
RefCntPtrDECLARE(anyClass)
#endif